CalendarService = Packages.com.google.gdata.client.calendar.CalendarService;
gdata           = Packages.com.google.gdata.data;
AclEntry        = Packages.com.google.gdata.data.acl.AclEntry;
AclScope        = Packages.com.google.gdata.data.acl.AclScope
CalendarAclRole = Packages.com.google.gdata.data.calendar.CalendarAclRole
CalendarEventEntry =Packages.com.google.gdata.data.calendar.CalendarEventEntry
DateTime         =  Packages.com.google.gdata.data.DateTime;
When             = Packages.com.google.gdata.data.extensions.When;
PlainTextConstruct = Packages.com.google.gdata.data.PlainTextConstruct
CalendarEventFeed = Packages.com.google.gdata.data.calendar.CalendarEventFeed
CalendarQuery     = Packages.com.google.gdata.client.calendar.CalendarQuery
Feed              = Packages.com.google.gdata.data.Feed

  function main( ui ) {
     try{
        var service = new CalendarService("demo-calendar-1");
        var username = "soulsoftware2010@gmail.com";
        var password = "2010soulsoftware";
        service.setUserCredentials(username, password);
     
       
     
        var postUrl =
          new java.net.URL("https://www.google.com/calendar/feeds/"+username+"/private/full");

       var myQuery = new CalendarQuery(postUrl);
        myQuery.setMinimumStartTime(DateTime.parseDateTime("2011-03-01T00:00:00"));
        myQuery.setMaximumStartTime(DateTime.parseDateTime("2011-03-24T23:59:59"));

       
       var resultFeed = service.query(myQuery,Feed);
      
        for (var i = 0; i < resultFeed.getEntries().size(); i++) {
              var entry = resultFeed.getEntries().get(i);
              
         }
    }catch( e ) {
        return e;
    }
    
    return "OK";

}